function s_nc = do_ncs(varid)
%function ncs = do_ncs(varid)
%
%> x.file = 'fred.nc';
%> x.varid = 'foo';
%> x.change_miss = 1;
%> values = getnc(x);
%
%values = getnc(file, varid, bl_corner,  tr_corner, stride,  order, change_miss, new_miss);
%values = getnc(file, varid,        -1,         -1,     -1,     -2, change_miss, new_miss);

%Estremadura_Hydrodynamic
%ncs_file = {...
%'\\192.168.23.151\homes\Projects\netcdf\datasets\20061129_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20061206_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20061213_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20061220_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20061227_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070117_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070124_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070207_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070214_Estremadura_Hydrodynamic_newbat.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070221_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070228_Estremadura_Hydrodynamic.nc',...
% '\\192.168.23.151\homes\Projects\netcdf\datasets\20070307_Estremadura_Hydrodynamic.nc'...
% };

%Suplente
%'\\192.168.23.151\homes\Projects\netcdf\datasets\20060609_Portugal_Hydrodynamic.nc',...
% strin = 'Portugal_Hydrodynamic';
% %strin = 'Portugal_WaterProperties';
% ncs_file = {...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061122_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061129_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061206_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061213_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061220_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20061227_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070117_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070124_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070207_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070214_' strin '_new_batim.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070221_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070228_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070307_' strin '.nc'],...
% ['\\192.168.23.151\homes\Projects\netcdf\datasets\20070314_' strin '.nc']};

%Little Test / proof of concept
%ncs_file = {...
%['\\192.168.23.151\homes\Projects\netcdf\datasets\20060609_' strin '.nc'],...
%['\\192.168.23.151\homes\Projects\netcdf\datasets\20061227_' strin '.nc']}

ncs_file = '\\192.168.23.151\homes\Projects\netcdf\datasets\mean_Portugal_WaterProperties.nc';

if nargin > 0
    ncs_varid = varid;
else
    ncs_varid = 'Vel_X';
end
ncs_bl_corner = -1;
ncs_tr_corner = -1;
ncs_stride = -1;
ncs_order = -2;
ncs_change_miss = 2;
ncs_new_miss = 0;

s_nc = struct( ...
        'file', ncs_file, ...
        'varid', ncs_varid, ...
        'bl_corner', ncs_bl_corner, ...
        'tr_corner', ncs_tr_corner, ...
        'stride', ncs_stride, ...
        'order', ncs_order, ...
        'change_miss', ncs_change_miss, ...
        'new_miss', ncs_new_miss);